#include "IColliableObject.h"


//-----------------------------------------------------//
// Name : IsCollision                                  //
// Desc : Collision check with other IColliable Object //
//-----------------------------------------------------//
bool IColliableObject::IsCollision(IColliableObject obj)
{
	RECT objRect;

	objRect = obj.GetBoundBox();

	if( m_RectBoundBox.left < objRect.right &&
		m_RectBoundBox.right > objRect.left &&
		m_RectBoundBox.top < objRect.bottom &&
		m_RectBoundBox.bottom > objRect.top )
		return true;

	return false;
}


float IColliableObject::GetXPos()
{
	return m_Xpos;
}

float IColliableObject::GetYPos()
{
	return m_Ypos;
}

float IColliableObject::GetPrevXPos()
{
	return m_XPrevPos;
}

float IColliableObject::GetPrevYPos()
{
	return m_YPrevPos;
}

RECT IColliableObject::GetBoundBox()
{
	return m_RectBoundBox;
}

int IColliableObject::GetWidth()
{
	return m_nWidth;
}

int IColliableObject::GetHeight()
{
	return m_nHeight;
}